package dto

// LoginReq 登录请求参数
// TODO 验证码以及记住我，未实现
type LoginReq struct {
	AccountName string `json:"accountName" binding:"required"` // 账户名
	Password    string `json:"password" binding:"required"`    // 账户密码
	Captcha     string `json:"captcha"`                        // 登录验证码
	Remember    bool   `json:"remember"`                       // 记住我
}

type RegisterReq struct {
	Nickname    string `json:"nickname" binding:"required,min=2,max=12"`             // 昵称
	AccountName string `json:"accountName" binding:"required,min=5,max=12,alphanum"` // 账户
	Password    string `json:"password" binding:"required,min=6,max=12,alphanum"`    // 密码
	Phone       string `json:"phone" binding:"required"`                             // 手机号
	Email       string `json:"email" binding:"email"`                                // 邮箱
}

type UpdateAccountReq struct {
	Nickname string `json:"nickname" binding:"required,min=2,max=12"` // 昵称
	Phone    string `json:"phone" binding:"required"`                 // 手机号
	Email    string `json:"email" binding:"email"`                    // 邮箱
}

type HasAccountReq struct {
	AccountName string `form:"accountName" binding:"required,min=5,max=12,alphanum"` // 账户
}
type AccountDTO struct {
	AccountName string `json:"accountName"`
	Nickname    string `json:"nickname"`
	Phone       string `json:"phone"`
	Email       string `json:"email"`
	Password    string `json:"password"`
}
